package com.neuronbit.businessflow.intellij.psi;

import com.intellij.lang.refactoring.RefactoringSupportProvider;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.refactoring.changeSignature.ChangeSignatureHandler;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * The type Simple refactoring support provider.
 */
public final class SimpleRefactoringSupportProvider extends RefactoringSupportProvider {

    @Override
    public boolean isMemberInplaceRenameAvailable(@NotNull PsiElement elementToRename, @Nullable PsiElement context) {
        return false;//(elementToRename instanceof SimpleProperty);
    }

    @Override
    public @Nullable ChangeSignatureHandler getChangeSignatureHandler() {
        return new ChangeSignatureHandler() {
            @Override
            public @Nullable PsiElement findTargetMember(@NotNull PsiElement psiElement) {
                return null;
            }

            @Override
            public void invoke(@NotNull Project project, PsiElement @NotNull [] psiElements, @Nullable DataContext dataContext) {
                int length = psiElements.length;
            }

            @Override
            public @Nullable @NlsContexts.DialogMessage String getTargetNotFoundMessage() {
                return null;
            }

            @Override
            public void invoke(@NotNull Project project, Editor editor, PsiFile psiFile, DataContext dataContext) {
                String fileName = psiFile.getName();
            }
        };
    }
}
